package com.example.robertluozizhao.framecollectdemo.util

/**
 *
 * <pre>
 *     author: luozz@anjiu-tech.com
 *     time  : 2022/3/25 3:59 下午
 *     desc  :
 * </pre>
 *
 **/
class TestBlock {

    companion object {

        @JvmStatic
        fun main(string: Array<String>) {


            val bean = Bean()
//            val listen =  object : TestListen.onCallBack(bean){}



            println("count : ${addList(1,2,3)}")
            println("1.5".toFloatOrNull()?:0)

        }

        fun addList(vararg param:Int):Int{
            var count = 0
            param.forEach { count += it }
            return count
        }

    }





    class Bean() {
        companion object {
            var count = 0
        }
        fun toPrint() {
            print("执行 count $count")
        }
    }

    interface TestListen {
        fun onCallBack(bean: Bean)
    }
}